<template>
  <div>
    <h2>我是count组件</h2>
    <button @click="count1++">累加父组件传给子组件的值</button>
    <button @click="add">查看组件实例</button>
    <p>子组件展示prop{{count1}}</p>
  </div>
</template>

<script>
export default {
  name: 'Count',
  data(){
    return{
      count1:this.count,
    }
  },
  props:["count"],
  methods:{
    add(){
      console.log(this);
      console.log(this.count);
      console.log(this.$props.count);
    }
  }
}
</script>
